$(function() {
    var i = -1;
    var toastCount = 0;
    var $toastlast;
    var getMessage = function() {
        var msg = "Hi, welcome to Inspinia. This is example of Toastr notification box.";
        return msg
    };
    $("#showerror").click(function() {
        toastr.error("报警ＸＸＸ", "XXX号报警提示")
    });
    $("#showwarning").click(function() {
        toastr.warning("警告请检查ＸＸＸ", "Simple notification!")
    });
	/*加一个单击事件*/
	toastr.options.onclick = function() {
                alert("直接跳到转XXXX")
            }

    function getLastToast() {
        return $toastlast
    }
    $("#clearlasttoast").click(function() {
        toastr.clear(getLastToast())
    });
    $("#cleartoasts").click(function() {
        toastr.clear()
    })
});